Skip to content

feat(cli): add video discovery output#133

Open
abimaelmartell wants to merge 3 commits into
mainfrom
abi/videos-response-types
Open

feat(cli): add video discovery output#133
abimaelmartell wants to merge 3 commits into
mainfrom
abi/videos-response-types

Conversation

@abimaelmartell

Copy link
Copy Markdown
Member

Summary

Add support for the video scrape format in the CLI so page-level video discovery can be requested directly. Single-format video output prints discovered video URLs, while JSON and multi-format output preserve the full videos metadata array and the legacy video field remains supported.

This also updates CLI help, docs, and tests around video format parsing and output behavior.

@abimaelmartell abimaelmartell marked this pull request as ready for review June 12, 2026 18:07
@abimaelmartell abimaelmartell requested a review from Copilot June 12, 2026 18:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds first-class CLI support for requesting page-level video discovery via --format video, with single-format output printing newline-separated video URLs while JSON/multi-format output retains full videos metadata (and keeps the legacy video field working).

Changes:

  • Add video as a supported scrape/download/search scrape format and wire it through option parsing/help text.
  • Implement video output behavior: raw newline-separated URLs for single-format, and videos metadata passthrough for JSON/multi-format.
  • Add/adjust TypeScript types and expand unit tests and README/versioning to cover the new format.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/output.ts Adds video raw output handling and ensures videos metadata is included in multi-format JSON output when video is requested.
src/utils/options.ts Allows video in --format parsing/validation.
src/types/scrape.ts Adds video to ScrapeFormat, introduces VideoItem/ScrapeDocument, and narrows ScrapeResult.data typing.
src/index.ts Updates CLI help strings to mention video; adds a guard/error for parse --format video.
src/commands/scrape.ts Exposes video in the interactive wizard’s format picker.
src/tests/utils/output.test.ts Adds tests for single-format video raw output and multi-format JSON inclusion of videos.
src/tests/utils/options.test.ts Adds coverage for parsing video as a valid format.
src/tests/commands/search.test.ts Extends scrape format type-safety test to include video.
src/tests/commands/scrape.test.ts Extends scrape format type-safety test to include video.
README.md Documents --format video usage and the --json metadata behavior; bumps displayed version.
package.json Bumps package version to 1.19.7.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/index.ts
Comment on lines 502 to 505
.option(
'-f, --format <formats>',
'Output format(s), comma-separated (default: markdown). Available: markdown, html, rawHtml, links, images, summary, json'
'Output format(s), comma-separated (default: markdown). Available: markdown, html, rawHtml, links, images, summary, json, video'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants